package com.android.scj.tc.bean;


/**
 *
 * 设置CRC/协议切换 请求
 * @author LiuYaDong
 */
public class CRCSwitchingRequest {
	/**
	 *  0	1	CRC	0:北京，1：ITS标准
	 1	1	PROTOCAL	协议(0:55AA协议，1：FF协议)
	 2	1	SAVEFALG	是否保存（0不保存，1保存）

	 */
	private static final String cmdcode = "A9";
	private String crc = "01";
	private String PROTOCAL = "00";
	private String SAVEFALG = "01";
	private CRCSwitchingRequest(){}
	public static CMD_55AA create(String crc,String PROTOCAL,String SAVEFALG){
		if(crc == null || PROTOCAL == null  || SAVEFALG == null ||
				crc.length()!=2 || PROTOCAL.length() != 2 || SAVEFALG.length() != 2)
			return null;
		CRCSwitchingRequest c = new CRCSwitchingRequest();
		c.crc = crc;
		c.PROTOCAL = PROTOCAL;
		c.SAVEFALG = SAVEFALG;
		return CMD_55AA.create(cmdcode, c.crc + c.PROTOCAL + c.SAVEFALG);
	}
	public String getCrc() {
		return crc;
	}
	public String getPROTOCAL() {
		return PROTOCAL;
	}
	public String getSAVEFALG() {
		return SAVEFALG;
	}

}
